<template>
  <view class="container screen-width">
    <view class="product-image">
      <!-- v-if="detailInfo.productDetailImage.length" -->
      <swiper indicator-dots circular autoplay interval="3000" class="swiper">
        <swiper-item v-for="(item,index) in detailInfo.productDetailImage" :key="index">
          <!-- <image :src="imgurl + item" @click="previewCarouse(index)" /> -->
          <image :src="getImageUrl(item)" @click="previewImage(index)" />
        </swiper-item>
      </swiper>
      <!-- <view v-else class="no-img">暂无图片</view> -->
    </view>
    <view class="text-content">
      <div class="info-content">
        <view class="item price">
          <text>￥</text>
          {{ detailInfo.productPrice }}
        </view>
        <view class="item name">{{ detailInfo.productName }}</view>
        <view class="item business">销量：{{ detailInfo.productSale }}</view>
        <view class="item business" v-html="detailInfo.productSynopsis"></view>
      </div>
    </view>
    <view class="bottom">
      <view class="buy-btn" @click="onBuy">立即购买</view>
    </view>
    <Festival></Festival>
  </view>
</template>
<script src="./index.js"></script>
<style lang="less" scoped src="./index.less"></style>